package com.ruoyi.car.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.car.mapper.CarCommunityReplyMapper;
import com.ruoyi.car.domain.CarCommunityReply;
import com.ruoyi.car.service.ICarCommunityReplyService;

/**
 * 社区回复Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-04-07
 */
@Service
public class CarCommunityReplyServiceImpl implements ICarCommunityReplyService 
{
    @Autowired
    private CarCommunityReplyMapper carCommunityReplyMapper;

    /**
     * 查询社区回复
     * 
     * @param id 社区回复主键
     * @return 社区回复
     */
    @Override
    public CarCommunityReply selectCarCommunityReplyById(Long id)
    {
        return carCommunityReplyMapper.selectCarCommunityReplyById(id);
    }

    /**
     * 查询社区回复列表
     * 
     * @param carCommunityReply 社区回复
     * @return 社区回复
     */
    @Override
    public List<CarCommunityReply> selectCarCommunityReplyList(CarCommunityReply carCommunityReply)
    {
        return carCommunityReplyMapper.selectCarCommunityReplyList(carCommunityReply);
    }

    /**
     * 新增社区回复
     * 
     * @param carCommunityReply 社区回复
     * @return 结果
     */
    @Override
    public int insertCarCommunityReply(CarCommunityReply carCommunityReply)
    {
        carCommunityReply.setCreateTime(DateUtils.getNowDate());
        return carCommunityReplyMapper.insertCarCommunityReply(carCommunityReply);
    }

    /**
     * 修改社区回复
     * 
     * @param carCommunityReply 社区回复
     * @return 结果
     */
    @Override
    public int updateCarCommunityReply(CarCommunityReply carCommunityReply)
    {
        carCommunityReply.setUpdateTime(DateUtils.getNowDate());
        return carCommunityReplyMapper.updateCarCommunityReply(carCommunityReply);
    }

    /**
     * 批量删除社区回复
     * 
     * @param ids 需要删除的社区回复主键
     * @return 结果
     */
    @Override
    public int deleteCarCommunityReplyByIds(Long[] ids)
    {
        return carCommunityReplyMapper.deleteCarCommunityReplyByIds(ids);
    }

    /**
     * 删除社区回复信息
     * 
     * @param id 社区回复主键
     * @return 结果
     */
    @Override
    public int deleteCarCommunityReplyById(Long id)
    {
        return carCommunityReplyMapper.deleteCarCommunityReplyById(id);
    }
}
